package com.bxait.toymail.seckill.config;

import com.bxait.toymail.seckill.interceptor.LoginUserInterceptor;
import jdk.nashorn.internal.ir.annotations.Reference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/*
@description:
@ClassName SecKillWebConfig
@author Chen
@create 2023-04-30 9:46
@Version 1.0
*/
@Configuration
public class SecKillWebConfig implements WebMvcConfigurer {

//    @Autowired
//    LoginUserInterceptor loginUserInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new LoginUserInterceptor()).addPathPatterns("/**");
    }
}
